<template>
  <el-image
    v-bind="$attrs"
    v-if="$attrs.src"
    :previewSrcList="[$attrs.src]"
    @contextmenu.prevent
    class="dk-image"
  >
    <template #error>
      <div class="image-slot">
        <img style="width: 100%; height: 100%" src="@/assets/images/pic_fail.png" />
      </div>
    </template>
  </el-image>
  <UnUpload v-else />
</template>

<script setup>
import UnUpload from "./components/unUpload/index";
</script>

<style lang="scss" scoped>
.dk-image {
  border-radius: 4px;
}
</style>
